//
//  XMN_GroupDetailCell.m
//  B段项目
//
//  Created by dllo on 15/11/5.
//  Copyright © 2015年 谢美娜. All rights reserved.
//

#import "XMN_GroupDetailCell.h"
#import "Header.h"

@implementation XMN_GroupDetailCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _nameLabel = [[UILabel alloc]init];
        _nameLabel.font = [UIFont systemFontOfSize:15];
        _nameLabel.textColor = [UIColor grayColor];
        [self addSubview:_nameLabel];
        _contentLabel = [[UILabel alloc]init];
        _contentLabel.font = [UIFont systemFontOfSize:15];
        _contentLabel.numberOfLines = 0;
        _contentLabel.textColor = [UIColor lightGrayColor];
        [self addSubview:_contentLabel];
        
        _nameImageView = [[UIImageView alloc]init];
        [self addSubview:_nameImageView];
        
        _typeILView = [[XMN_ILView alloc]init];
        _typeILView.rightLabel.font = [UIFont systemFontOfSize:12];
        _typeILView.rightLabel.textColor = [UIColor grayColor];
        [self addSubview:_typeILView];
    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    _nameImageView.frame = CGRectMake(20 * FitWidth, 20 * FitHeight, 60 * FitWidth, 60 * FitWidth);
    _nameImageView.layer.masksToBounds = YES;
    _nameImageView.layer.cornerRadius = 30 * FitWidth;
    _nameLabel.frame = CGRectMake(_nameImageView.frame.origin.x + _nameImageView.frame.size.width + 10 * FitWidth, _nameImageView.frame.origin.y, 200 * FitHeight, 20 * FitWidth);
    _typeILView.frame = CGRectMake(_nameLabel.frame.origin.x, _nameLabel.frame.origin.y + _nameLabel.frame.size.height + 10 * FitHeight, _nameLabel.frame.size.width, 20 * FitHeight);
    _contentLabel.frame = CGRectMake(_nameImageView.frame.origin.x, _nameImageView.frame.origin.y + _nameImageView.frame.size.height + 30 * FitHeight, self.contentView.frame.size.width - 20 * FitWidth, 100 * FitHeight);
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
